local wuzuzhi = fk.CreateSkill{
    name = "lingling__wuzuzhi"
}
Fk:loadTranslationTable{
    ["lingling__wuzuzhi"] = "武卒制",
    [":lingling__wuzuzhi"] = "每回合限一次，当一名角色使用【杀】造成伤害后，你可以令其获得受伤角色一张牌，若受伤角色为你，你摸三张牌。",
    ["#lingling__wuzuzhi"] = "武卒制：是否令 %src 获得 %dest 一张牌？",
}

wuzuzhi:addEffect(fk.Damage,{
    can_trigger = function (self, event, target, player, data)
        return player:hasSkill(wuzuzhi.name) and data.card and data.card.trueName == "slash" and player:usedSkillTimes(wuzuzhi.name, Player.HistoryTurn) == 0 and not data.to.dead and not data.to:isNude() and not data.chain
    end,
    on_cost = function (self, event, target, player, data)
        if player.room:askToSkillInvoke(player,{
            prompt = "#lingling__wuzuzhi:"..data.from.id..":"..data.to.id,
            skill_name = wuzuzhi.name
        }) then
            return true
        end
    end,
    on_use = function (self, event, target, player, data)
        local room = player.room
        room:doIndicate(data.from.id, { data.to.id })
        local card = room:askToChooseCard(data.from, {
            target = data.to,
            flag = "he",
            skill_name = wuzuzhi.name,
        })
        room:obtainCard(data.from, card, false, fk.ReasonPrey, data.from, wuzuzhi.name)
        if data.to == player and not player.dead then
            player:drawCards(3, wuzuzhi.name)
        end
    end,
})

return wuzuzhi